From 6a2a1220fe886eb53fdd76ceb2efabd65d1ed3c0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=98yvind=20Kol=C3=A5s?= Date: Tue, 30 Aug 2005 12:35:10 +0000 Subject: [PATCH] cleaned up introspection output, added instrumentation --- ChangeLog | 9 +++++++++ babl/babl-introspect.c | 38 ++++++++++++++++++++++++++++++++------ 2 files changed, 41 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 149dfff..4bbacbe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2005-08-30 Øyvind Kolås + + * babl/babl-introspect.c: + (model_introspect), + (format_introspect), + (each_introspect): use double quotes for strings. + (conversion_introspect): new, show instrumentation data. + (fish_introspect): new, show instrumentation data. + 2005-08-30 Øyvind Kolås * babl/babl-classes.h: Added instrumentation variables to diff --git a/babl/babl-introspect.c b/babl/babl-introspect.c index 09995a8..fb2d0f6 100644 --- a/babl/babl-introspect.c +++ b/babl/babl-introspect.c @@ -134,7 +134,7 @@ model_introspect (Babl *babl) for (i=0; i< babl->model.components; i++) { - babl_log ("\t\tindex[%i] = '%s'", i, + babl_log ("\t\tindex[%i] = \"%s\"", i, BABL(babl->model.component[i])->instance.name ); } } @@ -160,23 +160,38 @@ static void format_introspect (Babl *babl) { int i; + babl_log ("\t\tmodel=\"%s\"", babl->format.model->instance.name); babl_log ("\t\tplanar=%i", babl->format.planar); babl_log ("\t\tcomponents=%i", babl->format.components); for (i=0; i< babl->format.components; i++) { - babl_log ("\t\tband[%i] type='%s' component='%s' sampling='%s'", + babl_log ("\t\tband[%i] type=\"%s\" sampling=\"%s\" component=\"%s\"", i, babl->format.type[i]->instance.name, - babl->format.component[i]->instance.name, - babl->format.sampling[i]->instance.name); + babl->format.sampling[i]->instance.name, + babl->format.component[i]->instance.name); } } +static void +conversion_introspect (Babl *babl) +{ + babl_log ("\t\tprocessings:%i pixels:%li", + babl->conversion.processings, babl->conversion.pixels); +} + +static void +fish_introspect (Babl *babl) +{ + babl_log ("\t\tprocessings:%i pixels:%li", + babl->fish.processings, babl->fish.pixels); +} + static int each_introspect (Babl *babl, void *user_data) { - babl_log ("\t'%s'\t%i\t%s", + babl_log ("\t\"%s\"\t%i\t%s", babl->instance.name, babl->instance.id, babl_class_name (babl->class_type)); @@ -201,8 +216,19 @@ each_introspect (Babl *babl, sampling_introspect (babl); item_conversions_introspect (babl); break; + case BABL_CONVERSION: + case BABL_CONVERSION_TYPE: + case BABL_CONVERSION_TYPE_PLANAR: + case BABL_CONVERSION_MODEL_PLANAR: + case BABL_CONVERSION_FORMAT: + case BABL_CONVERSION_FORMAT_PLANAR: + conversion_introspect (babl); + break; case BABL_FISH: - babl_log ("\t\tneed more data here%s", ""); + fish_introspect (babl); + break; + case BABL_FISH_REFERENCE: + fish_introspect (babl); break; default: break; -- 2.30.2